import config from "@/config"
import http from "@/utils/request"

export default {
	token: {
		url: `${config.API_URL}/auth/login`,
		name: "登录获取TOKEN",
		post: async function (data = {}) {
			return await http.post(this.url, data);
		}
	},
	objProcess: {
		url: `${config.API_URL}/objProcess`,
		post: async function (data, config = {}) {
			// eslint-disable-next-line no-debugger
			////debugger
			//return await http.post(this.url, data, config);
			
			return await http.post(this.url, data, config);
		},
	},
	GetProcessApi: {
		url: `${config.API_URL}/`,
		get: async function (ApiName,data) {
			return await http.get(`${config.API_URL}/` + ApiName, data);
		},
	},
	PostProcessApi: {
		url: `${config.API_URL}/`,
		post: async function (ApiName,data, config = {}) {
			return await http.post(this.url + ApiName, data, config);
		},
	},
	PostDownApi: {
		url: `${config.API_URL}/`,
		post: async function (ApiName,data, config = {}) {
			return await http.postDown(this.url + ApiName, data, config);
		},
	},
	PostUpload: {
		url: `${config.API_URL}/`,
		post: async function (ApiName,data, config = {}) {
			return await http.postUpload(this.url + ApiName, data, config);
		},
	},
}
